import './findranksingle.scss'
import CONSTANT from '@/common/constants.js'
import http from '@/common/http.js'
import Scroller from 'vux/src/components/scroller/index.vue'
import LoadMore from 'vux/src/components/load-more/index.vue'
export default {
  name: 'findrank',
  components: { Scroller, LoadMore },
  data () {
    return {
      showList: [],
      dayList: [],
      mouthList: [],
      yearList: [],
      pageSize: 20,
      pageNoYear: 0,
      pageNoMouth: 0,
      pageNoDay: 0,
      pageNumberDay: -1,
      pageNumberMouth: -1,
      pageNumberYear: -1,
      use_pullup: true,
      type: 'day',
      event_id:'',
      pullup_con: {
        content: ' ',
        pullUpHeight: 60,
        height: 40,
        autoRefresh: false,
        downContent: ' ',
        upContent: ' ',
        loadingContent: ' ',
        clsPrefix: 'xs-plugin-pullup-'
      },
      show_loading: false,
      tipText: '',
      bounce: false
    }
  },
  mounted () {
    this.show_loading = true
    this.event_id = this.$route.query.event_id
    this.onScrollBottom()
  },
  methods: {
    onScrollBottom () {
      this.show_loading = true
      http.post(CONSTANT.EVENT_DONDATE_RAND, {event_id: this.event_id,pageSize:10}, (res) => {
        this.show_loading = false
      console.log(res)
      if (res.code == 200) {
        this.showList = res.list
      } else {
        this.tipText = '服务器返回出错'
      }
    })
    },
    comeBack () {
      window.history.back()
    }
  }
}
